package com.internetCafes.spms.web.customer.service.impl.customer;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.internetCafes.spms.web.customer.entity.customer.CustomerMaterial;
import com.internetCafes.spms.web.customer.mapper.customer.CustomerMaterialMapper;
import com.internetCafes.spms.web.customer.model.customer.material.MaterialPagingDo;
import com.internetCafes.spms.web.customer.service.customer.ICustomerMaterialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 客户报考资料表 服务实现类
 * </p>
 *
 * @author Zj
 * @since 2021-10-20
 */
@Service
public class CustomerMaterialServiceImpl extends ServiceImpl<CustomerMaterialMapper, CustomerMaterial> implements ICustomerMaterialService {

    @Override
    public Page<CustomerMaterial> paging(Page<CustomerMaterial> page, MaterialPagingDo pagingDo) {
        return baseMapper.paging(page, pagingDo);
    }

    @Override
    public boolean removeByCustomerIdList(List<Long> customerIdList) {
        return remove(new LambdaQueryWrapper<CustomerMaterial>().in(CustomerMaterial::getCustomerId, customerIdList));
    }
}
